public class Test1 {
    public Rational chuti() {
        int n = 6;
        RamdomObjs obj = new RamdomObjs();
        String s = obj.equation(1*n);
        //System.out.println(s);
        s = obj.testequation(1*n);
        //System.out.println(s);
        s = StringToArithmetic.infixToSuffix(s);
        System.out.println(s);
        Solution Sl = new Solution();
        Rational end = new Rational();
        int i,j = 0;
        String str [] = new String[5*n];
        for (i = 0;i <s.length(); i++){
            str [i] = "";
        }
        for (i = 0; i<s.length(); i++){
            if (s.charAt(i) == '1'&&s.charAt(i+1) == '0'){
                str [j] += s.charAt(i);
            }
            else{
                str [j] += s.charAt(i);
                j++;
            }
        }
        if (!str[j-1].equals("")){
            str[j] = "";
        }
        end = Sl.evalRPN(str);
        /*int a,b;
        a = end.numerator;
        b = end.denominator;
        System.out.printf("%d/%d",a,b);*/
        return end;
    }
}
